.class public Lcom/waiqin365/lightapp/kaoqin/view/TimeLengthView;
.super Lcom/waiqin365/lightapp/view/LabelView_vertical;


# instance fields
.field public a:Landroid/content/Context;

.field public b:F


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    invoke-direct {p0, p1}, Lcom/waiqin365/lightapp/view/LabelView_vertical;-><init>(Landroid/content/Context;)V

    const/4 v0, 0x0

    iput v0, p0, Lcom/waiqin365/lightapp/kaoqin/view/TimeLengthView;->b:F

    iput-object p1, p0, Lcom/waiqin365/lightapp/kaoqin/view/TimeLengthView;->a:Landroid/content/Context;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/view/LabelView_vertical;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, 0x0

    iput v0, p0, Lcom/waiqin365/lightapp/kaoqin/view/TimeLengthView;->b:F

    iput-object p1, p0, Lcom/waiqin365/lightapp/kaoqin/view/TimeLengthView;->a:Landroid/content/Context;

    return-void
.end method


# virtual methods
.method public setTimeLength(Ljava/util/Date;Ljava/util/Date;)V
    .locals 4

    invoke-virtual {p2}, Ljava/util/Date;->getTime()J

    move-result-wide v0

    invoke-virtual {p1}, Ljava/util/Date;->getTime()J

    move-result-wide v2

    sub-long/2addr v0, v2

    long-to-float v0, v0

    const v1, 0x4a5bba00    # 3600000.0f

    div-float/2addr v0, v1

    new-instance v1, Ljava/text/DecimalFormat;

    const-string/jumbo v2, "##0.00"

    invoke-direct {v1, v2}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V

    float-to-double v2, v0

    invoke-virtual {v1, v2, v3}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F

    move-result v0

    iput v0, p0, Lcom/waiqin365/lightapp/kaoqin/view/TimeLengthView;->b:F

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget v1, p0, Lcom/waiqin365/lightapp/kaoqin/view/TimeLengthView;->b:F

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "  "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/kaoqin/view/TimeLengthView;->a:Landroid/content/Context;

    const v2, 0x7f0802de

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kaoqin/view/TimeLengthView;->setValue(Ljava/lang/String;)V

    return-void
.end method
